symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym
# Uncomment this include when adding new development symbols.
-#if BUILDOPT_IS_DEVEL_BUILD
-#symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
-#endif
+if BUILDOPT_IS_DEVEL_BUILD
+symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
+endif
# http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html
wl_versionscript_arg = -Wl,--version-script=
ostree_sepolicy_restorecon
ostree_sepolicy_setfscreatecon
ostree_sepolicy_fscreatecon_cleanup
+ostree_sepolicy_set_null_log
<SUBSECTION Standard>
OSTREE_SEPOLICY
OSTREE_IS_SEPOLICY
- uncomment the include in Makefile-libostree.am
*/
+LIBOSTREE_2025.2 {
+global:
+ ostree_sepolicy_set_null_log;
+} LIBOSTREE_2025.1;
+
/* Stub section for the stable release *after* this development one; don't
* edit this other than to update the year. This is just a copy/paste
* source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION
#endif
+__attribute__ ((format (printf, 2, 3))) static int
+_ostree_sepolicy_null_log (int type, const char *fmt, ...)
+{
+ return 0;
+}
+
+/**
+ * ostree_sepolicy_set_null_log:
+ * Disable SELinux's builtin logging; one rarely wants this enabled.
+ *
+ * Since: 2025.2
+ */
+void
+ostree_sepolicy_set_null_log (void)
+{
+#ifdef HAVE_SELINUX
+ selinux_set_callback (SELINUX_CB_LOG,
+ (const union selinux_callback){ .func_log = _ostree_sepolicy_null_log });
+#endif
+}
+
/**
* ostree_sepolicy_new_from_commit:
* @repo: The repo
_OSTREE_PUBLIC
GType ostree_sepolicy_get_type (void);
+_OSTREE_PUBLIC
+void ostree_sepolicy_set_null_log (void);
+
_OSTREE_PUBLIC
OstreeSePolicy *ostree_sepolicy_new (GFile *path, GCancellable *cancellable, GError **error);
return TRUE;
}
+ // Disable this, it's just noise
+ ostree_sepolicy_set_null_log ();
+
g_autoptr (GFile) sysroot_path = NULL;
if (opt_sysroot != NULL)
sysroot_path = g_file_new_for_path (opt_sysroot);